+Wed Dec 12 16:18:26 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (gtk_menu_realize): Remove support for
+ "prepainting" the menu before realizing other than
+ via gtk_style_set_background() - this was broken when
+ we added menu scroll support.
+
+ * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the
+ window in the expose event -- fixes problem with border
+ flashing during scrolling.
+
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.c (gtk_settings_get_property): Support
+Wed Dec 12 16:18:26 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (gtk_menu_realize): Remove support for
+ "prepainting" the menu before realizing other than
+ via gtk_style_set_background() - this was broken when
+ we added menu scroll support.
+
+ * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the
+ window in the expose event -- fixes problem with border
+ flashing during scrolling.
+
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.c (gtk_settings_get_property): Support
+Wed Dec 12 16:18:26 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (gtk_menu_realize): Remove support for
+ "prepainting" the menu before realizing other than
+ via gtk_style_set_background() - this was broken when
+ we added menu scroll support.
+
+ * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the
+ window in the expose event -- fixes problem with border
+ flashing during scrolling.
+
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.c (gtk_settings_get_property): Support
+Wed Dec 12 16:18:26 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (gtk_menu_realize): Remove support for
+ "prepainting" the menu before realizing other than
+ via gtk_style_set_background() - this was broken when
+ we added menu scroll support.
+
+ * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the
+ window in the expose event -- fixes problem with border
+ flashing during scrolling.
+
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.c (gtk_settings_get_property): Support
+Wed Dec 12 16:18:26 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (gtk_menu_realize): Remove support for
+ "prepainting" the menu before realizing other than
+ via gtk_style_set_background() - this was broken when
+ we added menu scroll support.
+
+ * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the
+ window in the expose event -- fixes problem with border
+ flashing during scrolling.
+
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.c (gtk_settings_get_property): Support
+Wed Dec 12 16:18:26 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (gtk_menu_realize): Remove support for
+ "prepainting" the menu before realizing other than
+ via gtk_style_set_background() - this was broken when
+ we added menu scroll support.
+
+ * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the
+ window in the expose event -- fixes problem with border
+ flashing during scrolling.
+
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.c (gtk_settings_get_property): Support
+Wed Dec 12 16:18:26 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkmenu.c (gtk_menu_realize): Remove support for
+ "prepainting" the menu before realizing other than
+ via gtk_style_set_background() - this was broken when
+ we added menu scroll support.
+
+ * gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the
+ window in the expose event -- fixes problem with border
+ flashing during scrolling.
+
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtksettings.c (gtk_settings_get_property): Support
GtkRequisition *requisition);
static void gtk_menu_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void gtk_menu_paint (GtkWidget *widget);
+static void gtk_menu_paint (GtkWidget *widget,
+ GdkEventExpose *expose);
static void gtk_menu_show (GtkWidget *widget);
static gboolean gtk_menu_expose (GtkWidget *widget,
GdkEventExpose *event);
gtk_menu_scroll_item_visible (GTK_MENU_SHELL (widget),
GTK_MENU_SHELL (widget)->active_menu_item);
- gtk_menu_paint (widget);
-
gdk_window_show (menu->bin_window);
gdk_window_show (menu->view_window);
}
}
static void
-gtk_menu_paint (GtkWidget *widget)
+gtk_menu_paint (GtkWidget *widget,
+ GdkEventExpose *event)
{
- gint border_x;
- gint border_y;
- gint width, height;
- gint menu_height;
- gint top_pos;
GtkMenu *menu;
+ gint width, height;
+ gint border_x, border_y;
g_return_if_fail (GTK_IS_MENU (widget));
menu = GTK_MENU (widget);
- if (GTK_WIDGET_DRAWABLE (widget))
+ border_x = GTK_CONTAINER (widget)->border_width + widget->style->xthickness;
+ border_y = GTK_CONTAINER (widget)->border_width + widget->style->ythickness;
+ gdk_window_get_size (widget->window, &width, &height);
+
+ if (event->window == widget->window)
{
gtk_paint_box (widget->style,
widget->window,
GTK_SHADOW_OUT,
NULL, widget, "menu",
0, 0, -1, -1);
-
- border_x = GTK_CONTAINER (widget)->border_width + widget->style->xthickness;
- border_y = GTK_CONTAINER (widget)->border_width + widget->style->ythickness;
- gdk_window_get_size (widget->window, &width, &height);
-
if (menu->upper_arrow_visible && !menu->tearoff_active)
{
gtk_paint_box (widget->style,
MENU_SCROLL_ARROW_HEIGHT - 2 * border_y - 2,
MENU_SCROLL_ARROW_HEIGHT - 2 * border_y - 2);
}
-
+ }
+ else if (event->window == menu->view_window)
+ {
+ gint menu_height;
+ gint top_pos;
+
if (menu->scroll_offset < 0)
gtk_paint_box (widget->style,
menu->view_window,
if (GTK_WIDGET_DRAWABLE (widget))
{
- gtk_menu_paint (widget);
+ gtk_menu_paint (widget, event);
(* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event);
}